lunomods.openurl = function(url)
	local tempfile = minetest.get_worldpath().."/tempfile.tmp"
	--print("------------[LUNOMODS]------------------------------------------------------------------------------")
	local result1 = os.execute("curl -s '"..url.."'  > "..tempfile)
	--print("result1 = "..tostring(result1))
	if result1 == 0 then --(0 = bem executado)
		local file = io.open(tempfile, "r")
		if file~=nil then
			local testo = file:read("*all")
			file:close()
			return tostring(testo)
			
		end
	end
end

lunomods.test_openurl = function()
	print("------------[lunomods.test_openurl]-------------------------------------------------------")
	--local testo = lunomods.openurl("http://www.tuatec.com.br/home/subs/info.php")
	local testo = lunomods.openurl("https://raw.githubusercontent.com/FlatIO/adagio.json/master/package.json")
	local myjson = minetest.parse_json(testo)
	--print("testo = "..dump(myjson))
	print("myjson.description = "..myjson.description)
	print("------------------------------------------------------------------------------------------")
end
